Including MRJToolkit With Your Application
When building your Java application, you must link against the fileMRJToolkitStubs.zip
, which allows your application to access the proper MRJToolkit methods at runtime. This file contains the proper class declarations, but only stub implemenations (that is, the code does nothing).The Java class files that make up MRJToolkit are stored in the file
MRJClasses.zip
, which is placed in the Extensions folder as part of the normal MRJ installation for MRJ 1.5 and later. If desired, you can choose to package the fileMRJToolkitStubs.zip
with your Java application using JBindery. Doing so ensures that your application can always find a set of MRJToolkit classes (even if they are the stub versions that do nothing). For more information about including Java classes with your application, see the document Using JBindery.
If you are writing code meant to be compatible with multiple platforms, you can check for the presence of MRJToolkit using the
- Note
- MRJToolkit classes are included in
MRJClasses.zip
only with MRJ 1.5 and later. If the MRJToolkit libraries are not available on the host computer at execution time and you have not includedMRJToolkitStubs.zip
with your application, an error occurs.![]()
isMRJToolkitAvailable
method in the classcom.apple.mrj.MRJApplicationUtils
.